package chapter15;

import chapter14.interfaces.A;
import chapter14.interfaces.B;

/**
 * @author : DuJiabao
 * @Date : 2021/3/4 15:43
 * @Project : thinking_in_java
 * @File : null.java
 * @Desc :
 */
public class ThreeTuple<A, B, C> extends TwoTuple<A, B> {
  public final C third;

  public ThreeTuple(A first, B second, C third) {
    super(first, second);
    this.third = third;
  }

  @Override
  public String toString() {
    return "(" + first + "," + second + "," + third + ")";
  }

  public static void main(String[] args) {
    ThreeTuple<Integer, Integer, Integer> tuple = new ThreeTuple<>(1, 2, 3);
    System.out.println(tuple);
  }
}
